package com.dfiov.cloud.msmtools.mapper.msmtoolsMapper;

import com.dfiov.cloud.msmtools.entity.dto.*;
import com.dfiov.cloud.msmtools.mapper.entity.msmtools.*;
import com.dfiov.cloud.msmtools.mapper.entity.msmtools.MsmtoolsColumnsDo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AuthMapper {

    MsmtoolsUserInfoDo getUserByAccountAndPswd(@Param("account") String account, @Param("pswd") String pswd);

    MsmtoolsUserInfoDo getUserByAccount(@Param("account") String account);

    MsmtoolsUserInfoDo selectOneMsmtoolsUserInfo(int userId);

    List<MsmtoolsUserInfoDto> selectAllMsmtoolsUserInfo(
            @Param(value = "offset") int offset,
            @Param(value = "limit")int limit);

    List<MsmtoolsMessageDo> selectAllMsmtoolsMessage(
            @Param(value = "name")String name,
            @Param(value = "description")String description,
            @Param(value = "offset") int offset,
            @Param(value = "limit")int limit);


    int selectAllCountMsmtoolsUserInfo();

    int selectAllCountMsmtoolsMessage();

    List<MsmtoolsPowerDo> selectAllCountMsmtoolsPower();

    int saveUserTokens(UserTokensDo userTokensDo);

    int saveMsmtoolsUserInfoDo(MsmtoolsUserInfoDo msmtoolsUserInfoDo);

    int updateMsmtoolsUserInfoDo(MsmtoolsUserInfoDo msmtoolsUserInfoDo);

    String selectMenuByUserId(int userId);

    UserTokensDo selectUserTokensByUserId(int userId);

    MsmtoolsMenuDo selectOneMsmtoolsMenuByMId(int mId);

    List<MsmtoolsMenuDo> selectMsmtoolsMenuListByMIds(List<Integer> mIds);

    List<MsmtoolsMenuDo> selectMsmtoolsMenuListByParentMId(int parent_m_id);

    List<MsmtoolsColumnsDo> getmenulist(String tableName);

    List<MsmtoolsMenuDo> selectAllMsmtoolsMenu();

    MsmtoolsMenuDo selectoneMsmtoolsMenuByPath(String path);

    int addmenu(MsmtoolsMenuDo addmenuVo);

    int updateMenu(MsmtoolsMenuDo addmenuVo);

    void deleteMenuByMId(int m_id);

    int editType(UpdatePowerDo updatePowerDo);

    int addtype(UpdatePowerDo updatePowerDo);

    List<MsmtoolsBusinessFieldDo> selectFieldListByBusiness(String business);
}
